package org.crud4j.wicket.markup.html.editor;

import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.PropertyModel;
import org.crud4j.core.CrudField;

abstract class AbstractEditorPanel extends Panel {

	protected CrudField field;

	public AbstractEditorPanel(String id, IModel model) {
		super(id, model);
		field = (CrudField) ((PropertyModel) model).getTarget();
	}
	
	public AbstractEditorPanel(String id, IModel model, CrudField field) {
		super(id, model);
		this.field = field;
	}	

}
